<?php

$myarray = [1, 2, 3];
$myobj = (object)$myarray;

if ($myarray instanceof Traversable) {
    print "myarray is NOT Traversable";
}
if ($myobj instanceof Traversable) {
    print "myobj is NOT Traversable";
}

foreach ($myarray as $value) {
    print $value;
}
foreach ($myobj as $value) {
    print $value;
}
